import {lazy} from "react"
const routes = [
    {
        path: "/login",
        component:lazy(()=>import("../views/login/Login"))
    },
    {
        path: "/detail/:id",
        component:lazy(()=>import("../views/detail/Detail"))
    },
    {
        path: "/weite",
        component:lazy(()=>import("../views/weite/Write"))
    },
    {
        path: "/index",
        component: lazy(() => import("../views/home/index")),
        children: [
            {
                path: "/index/shou",
                component: lazy(() => import("../views/home/shou/Shou")),
            },
            {
                path: "/index/car",
                component: lazy(() => import("../views/home/car/Car")),
            },
            {
                path: "/index/shop",
                component: lazy(() => import("../views/home/shop/Shop")),
            },
            {
                path: "/index/my",
                component: lazy(() => import("../views/home/my/My")),
            },
            {
                path: "/index",
                to:"/index/shou"
            }
        ]
    },
    {
        path: "/",
        to:"/index"
    }
]
export default routes